package com.yb0os1.ComplexJDKProxy;


public class ComplexTest {
    public static void main(String[] args) throws Exception {
        NameService nameServiceProxy = (NameService)MyProxy.newProxyInstance(NameService.class.getClassLoader(), NameService.class, new LogHandler(new NameServiceImpl()));
        nameServiceProxy.printName();

        Test testProxy = (Test)MyProxy.newProxyInstance(Test.class.getClassLoader(), Test.class, new LogHandler(new TestImpl()));
        testProxy.test();
    }
}
